/*******************************************************************************
 * Copyright (c) 2011 Grupo de Sistemas Inteligentes (GSI) - DIT UPM
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package es.upm.dit.gsi.eclipse.jadex.common.preferences;

import org.eclipse.jface.preference.*;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.IWorkbench;
import es.upm.dit.gsi.eclipse.jadex.common.Activator;

/**
 * Preference page for the Eclipse Jadex plugin.
 * 
 *  THIS IS USED AS A ROOT PAGE FOR THE REST OF THE PREFERENCES PAGES FOR THE PLUGIN
 *  
 *  @author Pablo Muñoz
 */
public class EclipseJadexPreferencePage
	extends FieldEditorPreferencePage
	implements IWorkbenchPreferencePage {

	/**
	 * Constructor for the EclipseJadexPreferencePage
	 */
	public EclipseJadexPreferencePage() {
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Eclipse Jadex Preferences");
	}
	
	/**
	 * Creates the field editors. 
	 */
	public void createFieldEditors() {
		/*
		Composite container = new Composite(this.getFieldEditorParent(), SWT.NULL);
		GridLayout layout = new GridLayout(2, true);
		container.setLayout(layout);
		layout.horizontalSpacing = 20;
		layout.verticalSpacing = 4;
		
		
		GridData gd = new GridData(SWT.FILL, SWT.TOP, true, false,1,1);
		Group loginBox = new Group(container, SWT.BORDER | SWT.FLAT);
		loginBox.setLayoutData(gd);
		loginBox.setText("Capabilities Repository Login");
		addField(new StringFieldEditor(PreferenceConstants.USER, "User:", loginBox));
		StringFieldEditor passwordFieldEditor = new StringFieldEditor(PreferenceConstants.PASSWORD, "Password:",loginBox);
		passwordFieldEditor.getTextControl(loginBox).setEchoChar('*');
		addField(passwordFieldEditor);
		loginBox.setSize(40, 40);
		*/
		
		/*
		addField(new DirectoryFieldEditor(PreferenceConstants.JADEX_PATH, 
				"&Path to Jadex installation:", getFieldEditorParent()));
		addField(new StringFieldEditor(PreferenceConstants.JADEX_VERSION, 
				"&Version:", getFieldEditorParent()));
				*/
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
	 */
	public void init(IWorkbench workbench) {
	}
	
}